
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>文章新增</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui/css/layui.css">
</head>
<body>
<form class="layui-form" action="${pageContext.request.contextPath}/article/uploadImg" method="post">
<textarea id="content" style="width: 500px;height: 300px"></textarea>
    <div class="layui-form-item">
        <label class="layui-form-label">作者</label>
        <div class="layui-input-inline">
            <input type="text" name="operator" value="${sessionScope.admin.id}" required  lay-verify="required" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item" style="margin-left: 110px">
        <div class="layui-input-inline">
            <button class="layui-btn" lay-submit lay-filter="formDemo">提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script src="${pageContext.request.contextPath}/static/layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use('layedit', function () {
        var layedit = layui.layedit;
        layedit.set({
            uploadImage:{//图片上传的接口
                url:'${pageContext.request.contextPath}/uploadImg',//接口url
                type:'post'//默认post
            },
            height:200
        });
        layedit.build('content');//建立编辑器
    });
</script>
</body>
</html>
